package com.cash.channel.svc.util;

import com.google.common.collect.Lists;

public class EmailUtils {

    private static final String[] ydList = new String[]{"139","138","137","136","135","134","188","187","184","183","182","178","159","158","157","152","151","150","198"};
    private static final String[] ltList = new String[]{"186","185","176","156","155","132","131","130","175","166"};
    private static final String[] dxList = new String[]{"189","181","180","177","153","133","133","173","199"};

    public static String getEmailByPhone(String mobile) {
        if (Lists.newArrayList(ydList).contains(mobile.substring(0,3))) {
            return mobile+"@139.com";
        } else if (Lists.newArrayList(ltList).contains(mobile.substring(0,3))) {
            return mobile+"@wo.cn";
        } else if (Lists.newArrayList(dxList).contains(mobile.substring(0,3))) {
            return mobile+"@189.com";
        } else {
            return mobile+"@126.com";
        }
    }

}
